<!DOCTYPE html>
<html>
<body>
<template id="target-template">
<svg width="0" height="0">
<feConvolveMatrix class="target" />
</svg>
</template>
<script src="../svg-attribute-interpolation/resources/interpolation-test.js"></script>
<script>
'use strict';
assertAttributeInterpolation({
  property: 'targetX',
  underlying: '128',
  from: '-32',
  fromComposite: 'add',
  to: '1029',
  toComposite: 'add',
}, [
  {at: -0.4, is: -328},
  {at: 0, is: 96},
  {at: 0.2, is: 308},
  {at: 0.6, is: 733},
  {at: 1, is: 1157},
  {at: 1.4, is: 1581}
]);

assertAttributeInterpolation({
  property: 'targetX',
  underlying: '-37',
  from: '18',
  fromComposite: 'replace',
  to: '1',
  toComposite: 'add',
}, [
  {at: -0.4, is: 40},
  {at: 0, is: 18},

  {at: 0.6, is: -14},
  {at: 1, is: -36},
  {at: 1.4, is: -58}
]);

assertAttributeInterpolation({
  property: 'targetX',
  underlying: '2',
  from: neutralKeyframe,
  to: '-99',
  toComposite: 'replace',
}, [
  {at: -0.4, is: 42},
  {at: 0, is: 2},
  {at: 0.2, is: -18},
  {at: 0.6, is: -59},
  {at: 1, is: -99},
  {at: 1.4, is: -139}
]);


assertAttributeInterpolation({
  property: 'targetY',
  underlying: '128',
  from: '-32',
  fromComposite: 'add',
  to: '1029',
  toComposite: 'add',
}, [
  {at: -0.4, is: -328},
  {at: 0, is: 96},
  {at: 0.2, is: 308},
  {at: 0.6, is: 733},
  {at: 1, is: 1157},
  {at: 1.4, is: 1581}
]);

assertAttributeInterpolation({
  property: 'targetY',
  underlying: '-37',
  from: '18',
  fromComposite: 'replace',
  to: '1',
  toComposite: 'add',
}, [
  {at: -0.4, is: 40},
  {at: 0, is: 18},

  {at: 0.6, is: -14},
  {at: 1, is: -36},
  {at: 1.4, is: -58}
]);

assertAttributeInterpolation({
  property: 'targetY',
  underlying: '2',
  from: neutralKeyframe,
  to: '-99',
  toComposite: 'replace',
}, [
  {at: -0.4, is: 42},
  {at: 0, is: 2},
  {at: 0.2, is: -18},
  {at: 0.6, is: -59},
  {at: 1, is: -99},
  {at: 1.4, is: -139}
]);
</script>
</body>
</html>
